package com.hdax.dm.api.user;

import com.hdax.dm.entity.user.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "用户模块")
public interface UserControllerApi {

    @PostMapping(path = "/user/find")
    @ApiOperation(value = "用户登录",notes = "根据手机号查询信息")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(required = true,name = "phone",value = "用户登录手机号")
    })
    User find(@RequestParam("phone")String phone);

    @PostMapping(path = "/user/register")
    @ApiOperation(value = "用户登录",notes = "注册账号")
    boolean register(@RequestParam("phone")String phone,@RequestParam("password") String password);


}
